package cn.tedu.day01.jnsdlfaq.user.mapper;

import cn.tedu.day01.jnsdlfaq.user.pojo.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
    //登录入口
    @Select("select * from sys_user where login_name=#{username} and password=#{password}")
    SysUser login(String username, String password);

    @Select("select * from sys_user")
    IPage<SysUser> selectUserAll(Page page);

}
